# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年12月09日
"""
import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_excel('../source/grade1 - 5.6.3.xls')
plt.rcParams['font.sans-serif'] = ['SimHei']
x = df['得分']
plt.xlabel('分数')
plt.ylabel('学生数量')
plt.title('高一数学成绩分布直方图')
plt.hist(x, bins=[0, 25, 50, 75, 100, 125, 150], facecolor='blue', edgecolor='black', alpha=0.7)
plt.show()
